home *** CD-ROM | disk | FTP | other *** search
- *******************************************************************************
- * PROGRAM: Dump.prg
- *
- * WRITTEN BY: Borland Late Night Crew
- *
- * DATE: 6/93
- *
- * UPDATED:
- *
- * VERSION: Alpha α
- *
- * DESCRIPTION: This program shows the contents of the object passed to it.
- * It calls Bladerunner's enum() function to create a linked
- * list of the object's properties. It then steps through that
- * list displaying the name and value of each property of the
- * parameter object.
- *
- * PARAMETERS: O, an object
- *
- * CALLS: None
- *
- * USAGE: DO Dump with O
- *
- *
- *
- *******************************************************************************
- procedure dump
- parameters o
-
- if type("o") # "O"
- ?
- ? "Error: You must pass dump a parameter of type object."
- ?
- ? "Example1: do dump with _app"
- ?
- ? "Example2: x = new window()"
- ? " do dump with x"
- return
- endif
-
- e = enum(o) && create a linked list of the properties of O
- do while .not. e.eot && while .not. end of property list
- ? e.name, "--->",e.value && display name and value of property
- x = e.skip(1) && skip to the next property
- enddo
- ?
- return .f.
-
- ********************************** End of Dump.prg ****************************
-